import request from '@/utils/request'  
import cfg from '@/config/config'

const door = {
    getDoorList:(param) => {
        return request('post', cfg.apiUrl + 'api/door/getDoorList',param);
    },
    /** 门禁授权页面-开始 */
    getDoorAccessList:(param) => {
        return request('post', cfg.apiUrl + 'api/door/getDoorAccessList',param);
    },
    doorAccess:(param) => {
        return request('post', cfg.apiUrl + 'api/door/doorAccess',param);
    },
    doorAccessRemove:(param) => {
        return request('post', cfg.apiUrl + 'api/door/doorAccessRemove',param);
    },
    doorAccessExport:(param) => {
        window.open(cfg.apiUrl + "api/door/doorAccessExport?" + param,"_self");
    },
    /** 门禁授权页面-结束 */

    
    /** 门禁扩展授权页面-开始 */
    getDoorExpandList:(param) => {
        return request('post', cfg.apiUrl + 'api/door/getDoorExpandList',param);
    },
    doorExpandPublic:(param) => {
        return request('post', cfg.apiUrl + 'api/door/doorExpandPublic',param);
    },
    doorExpandDept:(param) => {
        return request('post', cfg.apiUrl + 'api/door/doorExpandDept',param);
    },
    doorExpandRemove:(param) => {
        return request('post', cfg.apiUrl + 'api/door/doorExpandRemove',param);
    },
    doorExpandExport:(param) => {
        window.open(cfg.apiUrl + "api/door/doorExpandExport?" + param,"_self");
    }
    /** 门禁扩展授权页面-结束 */
}

export default door;

